import CustomInput from '@/components/antd-comp/input/CustomInput'
import CustomSelect from '@/components/antd-comp/select/CustomSelect'
import { variableTypeOptions } from '../../constants'

// 临时输出结果展示
export default function TempNodeOutput({ outputList }) {
  return (
    <div className="flexCol InputCont_case">
      <div className="flexRowStart columns-title--dGaYetSzjjUdXN_u9_8J">
        <div className="input-head" style={{ width: '140px' }}>
          变量名称
        </div>

        <div className="input-head w-[calc((100%-140px)*0.4)]">变量类型</div>
        <div className="input-head w-[calc((100%-140px)*0.6)]">参数描述</div>
      </div>
      {outputList?.map((item, i) => (
        <div key={i} className="flexRowStart InputCont_marTop">
          <div style={{ width: '140px' }}>
            <CustomInput disabled placeholder="输入变量名称" value={item.variable} />
          </div>
          <div className="inputCont_end" style={{ width: 'calc(100% - 140px)' }}>
            <CustomSelect
              style={{ width: '40%' }}
              disabled
              value={item.type}
              options={variableTypeOptions}
              placeholder="变量类型"
            />
            <CustomInput
              disabled
              placeholder="输入参数描述"
              value={item.value}
              maxLength={500}
              style={{ width: '60%' }}
            />
          </div>
        </div>
      ))}
    </div>
  )
}
